home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Utilities / Programming / EnterAct 3.7.3 / Drag_on Modules / hAWK programs / $BoilerPlate < prev    next >
Encoding:
Text File  |  1996-05-21  |  1.2 KB  |  42 lines  |  [TEXT/KAHL]

  1. # $BoilerPlate : issue std top comment for a source file
  2. # No input, set variables putInComment, file, author, company before
  3. # -no harm done if don't.
  4. # If you would prefer to have this go to the clip instead of stdout,
  5. # set toStdOut = 0 just below AND deselect the "Show stdout" checkbox
  6. # (pick this program after selecting hAWK from the EnterAct menu,
  7. # uncheck "Show stdout", and click "Save settings").
  8.  
  9. BEGIN {
  10.     toStdOut = 1; # to file stdout; if 0, output is to clipboard.
  11.     if (putInComment+0)
  12.         PrintOut("/****");
  13.     PrintOut("\tFile.....:\t" " " file);
  14.     # For time use day month date year
  15.     match(TIME, /.*, [0-9][0-9][0-9][0-9]/);
  16.     PrintOut("\tDate.....:\t" " " substr(TIME, RSTART, RLENGTH));
  17.     # For copyright just use the year
  18.     match(TIME, /[0-9][0-9][0-9][0-9]/);
  19.     PrintOut("\t.........:   ©" " " substr(TIME, RSTART, RLENGTH) " " company ". All rights reserved.");
  20.     PrintOut("\tBy.......:\t" " " author);
  21.     PrintOut("\tStatus...:\t under development");
  22.     PrintOut("\tSpec.....:\t @");
  23.     #PrintOut("\tRevisions:\t ");
  24.     
  25.     if (putInComment+0)
  26.         PrintOut("****/");
  27.     
  28.     if (toStdOut == 0)
  29.         {
  30.         putclip(out);
  31.         beep(0);
  32.         }
  33.     }
  34.  
  35. function PrintOut(s)
  36.     {
  37.     if (toStdOut == 1)
  38.         print s;
  39.     else
  40.         out = out s "\r";
  41.     }
  42.